package com.scsystem.xysc.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

import lombok.Data;

/**
 * 
 * @TableName store
 */
@TableName(value ="store")
@Data
public class Store implements Serializable {
    /**
     * 唯一标识店铺的ID
     */
    @TableId(value = "store_id", type = IdType.AUTO)
    private Long storeId;

    /**
     * 店铺的名称
     */
    @TableField(value = "store_name")
    private String storeName;

    @TableField(value = "user_id")
    private Long userId;

    /**
     * 店铺的描述
     */
    @TableField(value = "store_description")
    private String storeDescription;

    /**
     * 店铺头像
     */
    @TableField(value = "store_avatar")
    private String storeAvatar;

    /**
     * 店铺的创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 店铺的状态（正常/封禁）
     */
    @TableField(value = "store_status")
    private String storeStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Store store = (Store) o;
        return Objects.equals(getStoreId(), store.getStoreId()) && Objects.equals(getStoreName(), store.getStoreName()) && Objects.equals(getUserId(), store.getUserId()) && Objects.equals(getStoreDescription(), store.getStoreDescription()) && Objects.equals(getCreateTime(), store.getCreateTime()) && Objects.equals(getStoreStatus(), store.getStoreStatus());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getStoreId(), getStoreName(), getUserId(), getStoreDescription(), getCreateTime(), getStoreStatus());
    }

    @Override
    public String toString() {
        return "Store{" +
                "storeId=" + storeId +
                ", storeName='" + storeName + '\'' +
                ", userId=" + userId +
                ", storeDescription='" + storeDescription + '\'' +
                ", createTime=" + createTime +
                ", storeStatus='" + storeStatus + '\'' +
                '}';
    }
}